// 打印命令行参数
package main

import (
	"fmt"
	"log"
	"os"
	"strconv"
)

func computeAverage(osArgs []string) (float64, error) {
	sumv := 0.0
	count := 0
	for _, arg := range osArgs {
		number, err := strconv.ParseFloat(arg, 64)
		if err != nil {
			return 0.0, err
		}
		sumv += number
		count += 1
	}
	return sumv / float64(count), nil
}

func main() {
	average, err := computeAverage(os.Args[1:])
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(os.Args[1:], average)
}
